interface Animal{
    name:string;
    age:number;
}
interface Dog extends Animal{
    eat(str:string):void
}
class WolfDog implements Dog{
    name: string;
    age: number;
    eat(str: string): void {
        console.log(str);
        
    }
    constructor(name:string,age:number){
        this.name = name;
        this.age = age
    }
}
var w:WolfDog = new WolfDog("狗",8);